@extends('layouts.information')

@section('content')
    <div class="row">
        <div class="col-sm-12 us_sheet_ves">
            <div class="us_sheet">
                <div class="us_sheet-child">
                    <table class="table table-hover">
                        <thead>
                        <th>id</th>
                        <th>名称</th>
                        <th>操作</th>
                        </thead>
                        <tbody>
                         @foreach($departs as $depart)
                        <tr>
                            <td>{{ $depart->id }}</td>
                            <td>{{ $depart->getSortName()}}</td>
                            <td>
                                {!! Form::open(['url' => route('depart.destroy',['id'=>$depart->id]),'method'=>'delete']) !!}
                                {!! Form::submit('删除',['class' => 'btn btn-info btn-danger']) !!}
                                {!! Form::close()!!}
                            </td>
                        </tr>
                        @endforeach

                        </tbody>
                    </table>
                </div>
            </div>
            <nav class="pull-right">
                {{ $departs->links() }}
            </nav>
        </div>
    </div>

<ul>
    <li>
        <a href="{{ route('depart.create') }}">创建</a>
    </li>
</ul>
@endsection
